package com.jic.point.controller.feign;

import com.jic.common.base.vo.RestResult;
import com.jic.point.api.IntegralMaterialObjectReceiveApi;
import com.jic.point.rest.request.CasartePointsCollectionQueryRequest;
import com.jic.point.rest.request.CollectionInKindRequest;
import com.jic.point.rest.request.PointsCollectionRequest;
import com.jic.point.rest.response.CasartePointsCollectionQueryResponse;
import com.jic.point.rest.response.CollectionInKindResponse;
import com.jic.point.rest.response.PointsCollectionResponse;
import com.jic.point.service.IntegralMaterialObjectReceiveService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Auther YGH
 * @DATE 2020/11/25/17:50
 */
@Api(tags = {"积分/实物 领取/查询接口"})
@RestController
@RequestMapping("pointReceive")
public class IntegralMaterialObjectReceive implements IntegralMaterialObjectReceiveApi {

    @Resource
    private IntegralMaterialObjectReceiveService integralMaterialObjectReceiveService;

    /**
     * @Auther: YGH
     * @DATE: 2020/11/25
     * "积分领取-调用积分中心领取积分"
     */
    @Override
    public RestResult<PointsCollectionResponse> getPointCollection(@RequestBody PointsCollectionRequest pointsCollectionRequest) {

        return integralMaterialObjectReceiveService.getPointCollection(pointsCollectionRequest);
    }

    /**
     * @Auther: YGH
     * @DATE: 2020/11/25
     * "实物领取-调用海贝商城领取实物"
     */
    @Override
    public RestResult<CollectionInKindResponse> getCollectionInKind(@RequestBody CollectionInKindRequest collectionInKindRequest) {
        return integralMaterialObjectReceiveService.getCollectionInKind(collectionInKindRequest);
    }

    /**
     * @Auther: YGH
     * @DATE: 2020/11/25
     * "卡萨帝积分领取查询"
     */
    @Override
    public RestResult<CasartePointsCollectionQueryResponse> getCasartePointQueryCollection(@RequestBody CasartePointsCollectionQueryRequest casartePointsCollectionQueryRequest) {
        return integralMaterialObjectReceiveService.getCasartePointQueryCollection(casartePointsCollectionQueryRequest);
    }
}
